# 方法1 dict()
# 方法2 {键1: 值1, 键2: 值2, ....}

dict1 = dict([(102, "张三"), (105, "李四"), (109, "王五")])   # 从列表转换为字典
print(dict1)

dict2 = {102: "张三", 105: "李四", 109: "王五"}
print(dict2)
print(type(dict2))

a = zip([102, 105, 109], ["张三", "李四", "王五"])
print(a)    # zip object
dict3 = dict(zip([102, 105, 109], ["张三", "李四", "王五"]))      # zip() 进行组合
print(dict3)

empty_dict1 = dict()    # 空字典
print(type(empty_dict1))
empty_dict2 = {}      # 空字典
print(empty_dict2)